/**
 * 
 */
package core.internal;

import java.util.ArrayList;

import util.Logger;

/**
 * @author cipri
 *
 */
public abstract class SystemItem
{
    protected String _name;
    
    public SystemItem(String name)
    {
        _name = name;
    }
    
    //Composite common operations
    
    public Boolean add(SystemItem item)
    {
        return false;
    }
    
    public Boolean remove(SystemItem item)
    {
        return false;
    }
    
    public ArrayList<SystemItem> getChilds()
    {
        return new ArrayList<SystemItem>();
    }
    
    public Boolean isDirectory()
    {
        return false;
    }
    
    //Common methods
    
    public void print()
    {
        Logger.logln(getName());
        for (int i = 0; i < getChilds().size(); i++)
        {
            getChilds().get(i).print();
        }
    }
    
    public String getName()
    {
        return _name;
    }
}
